home *** CD-ROM | disk | FTP | other *** search
/ Interactive Preview: Enemy of the State / Interactive Preview: Enemy of the State.iso / pc / main.dxr / 00559_sound controller s10.ls < prev    next >
Encoding:
Text File  |  1998-11-19  |  747 b   |  30 lines

  1. property pV, pMove
  2.  
  3. on beginSprite me
  4.   set pV to the locV of sprite the spriteNum of me
  5.   set pMove to 9
  6. end
  7.  
  8. on exitFrame me
  9.   set the locV of sprite the spriteNum of me to pV - (the soundLevel * pMove)
  10.   updateStage()
  11. end
  12.  
  13. on mouseDown me
  14.   repeat while the stillDown
  15.     if (the mouseV > 336) and (the mouseV < 408) then
  16.       set the locV of sprite the spriteNum of me to the mouseV
  17.       set sl to (pV - the locV of sprite the spriteNum of me) / pMove
  18.       set the soundLevel to sl
  19.       updateStage()
  20.       next repeat
  21.     end if
  22.     if the mouseV < 336 then
  23.       set the locV of sprite the spriteNum of me to 336
  24.     end if
  25.     if the mouseV > 408 then
  26.       set the locV of sprite the spriteNum of me to 408
  27.     end if
  28.   end repeat
  29. end
  30.